#ifndef SYNCINITMESSAGE_H_
#define SYNCINITMESSAGE_H_

#include <ariba/ariba.h>
#include "../Sync.h"

using namespace std;

using_serialization;

class SyncInitMessage : public ariba::Message
{
    VSERIALIZEABLE;

public:
    /// Default constructor, required for automatic de-serialization
    SyncInitMessage();

    SyncInitMessage(SyncPtr sync, bool ack);
    virtual ~SyncInitMessage();

    SyncPtr get_sync();
    bool is_ack();

private:
    string tag;
    string name;
    string mine_path;
    string your_path;
    uint8_t sync_type;
    uint8_t role;
    uint8_t ack;            // should be bool, but there is this ariba bug....
};


sznBeginDefault(SyncInitMessage, X)
{
    X && T(tag) && T(name) && T(mine_path) && T(your_path) && sync_type && role && ack;
} sznEnd();


#endif /* SYNCINITMESSAGE_H_ */
